package com.erpoa.entity;


import com.google.common.base.Objects;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.List;

/**
 * @description:
 * @author: jamin.chen
 * @createDate: 2019/12/25 9:25
 * @version: 1.0
 */
@Data
@Builder
@Slf4j
@EqualsAndHashCode
public class PackMessageByWuLiu implements Serializable {

    private String time;
    private String machine;
    private String jobnum;
    private String barcode;
    private String trayNumber;
    private String sName;
    private String mPckBarCode;
    private String defOutDate;
    private String mpckBarCode;

    @Override
    public String toString() {
        return "PackMessageByWuLiu{" +
                "time='" + time + '\'' +
                ", machine='" + machine + '\'' +
                ", jobnum='" + jobnum + '\'' +
                ", barcode='" + barcode + '\'' +
                ", trayNumber='" + trayNumber + '\'' +
                ", sName='" + sName + '\'' +
                ", mPckBarCode='" + mPckBarCode + '\'' +
                ", defOutDate='" + defOutDate + '\'' +
                ", mpckBarCode='" + mpckBarCode + '\'' +
                ", user=" + user +
                ", optType=" + optType +
                ", handOverNum=" + handOverNum +
                ", wareHouse='" + wareHouse + '\'' +
                ", library='" + library + '\'' +
                ", workers=" + workers +
                ", orderNo='" + orderNo + '\'' +
                ", crashLog='" + crashLog + '\'' +
                ", logFileName='" + logFileName + '\'' +
                ", status='" + status + '\'' +
                ", pos=" + pos +
                ", message='" + message + '\'' +
                '}';
    }

    public PackMessageByWuLiu(String time, String machine, String jobnum, String barcode, String trayNumber, String sName, String mPckBarCode, String defOutDate, String mpckBarCode, MgUser user, Integer optType, Float handOverNum, String wareHouse, String library, List<String> workers, String orderNo, String crashLog, String logFileName, String status, Integer pos, String message) {
        this.time = time;
        this.machine = machine;
        this.jobnum = jobnum;
        this.barcode = barcode;
        this.trayNumber = trayNumber;
        this.sName = sName;
        this.mPckBarCode = mPckBarCode;
        this.defOutDate = defOutDate;
        this.mpckBarCode = mpckBarCode;
        this.user = user;
        this.optType = optType;
        this.handOverNum = handOverNum;
        this.wareHouse = wareHouse;
        this.library = library;
        this.workers = workers;
        this.orderNo = orderNo;
        this.crashLog = crashLog;
        this.logFileName = logFileName;
        this.status = status;
        this.pos = pos;
        this.message = message;
    }

    public String getMpckBarCode() {
        return mpckBarCode;
    }

    public void setMpckBarCode(String mpckBarCode) {
        this.mpckBarCode = mpckBarCode;
    }

    private MgUser user;//扫描人

    private Integer optType;//0:注塑 1:印刷 2:装配  3:油画棒

    private Float handOverNum;//交接量，生产交接用的;拆箱数量，物料拆箱用

    private String wareHouse;//生产入库专用
    private String library;//生产入库专用

    private List<String> workers;//多人产出专用

    private String orderNo;

    private String crashLog;
    private String logFileName;
    private String status;  //入库专用状态 保存/编辑
    private Integer pos;//批次管理-提交位置

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private String message;

    public PackMessageByWuLiu(String time, String machine, String jobnum, String barcode, String trayNumber, String sName, String mPckBarCode, String defOutDate, MgUser user, Integer optType, Float handOverNum, String wareHouse, String library, List<String> workers, String orderNo, String crashLog, String logFileName, String status, Integer pos, String mMessage) {
        this.time = time;
        this.machine = machine;
        this.jobnum = jobnum;
        this.barcode = barcode;
        this.trayNumber = trayNumber;
        this.sName = sName;
        this.mPckBarCode = mPckBarCode;
        this.defOutDate = defOutDate;
        this.user = user;
        this.optType = optType;
        this.handOverNum = handOverNum;
        this.wareHouse = wareHouse;
        this.library = library;
        this.workers = workers;
        this.orderNo = orderNo;
        this.crashLog = crashLog;
        this.logFileName = logFileName;
        this.status = status;
        this.pos = pos;
     }



    public PackMessageByWuLiu() {
        super();
    }

    public PackMessageByWuLiu(String time, String machine, String jobnum, String barcode, String trayNumber, String sName, String mPckBarCode, String defOutDate, MgUser user, Integer optType, Float handOverNum, String wareHouse, String library, List<String> workers, String orderNo, String crashLog, String logFileName, String status, Integer pos) {
        this.time = time;
        this.machine = machine;
        this.jobnum = jobnum;
        this.barcode = barcode;
        this.trayNumber = trayNumber;
        this.sName = sName;
        this.mPckBarCode = mPckBarCode;
        this.defOutDate = defOutDate;
        this.user = user;
        this.optType = optType;
        this.handOverNum = handOverNum;
        this.wareHouse = wareHouse;
        this.library = library;
        this.workers = workers;
        this.orderNo = orderNo;
        this.crashLog = crashLog;
        this.logFileName = logFileName;
        this.status = status;
        this.pos = pos;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }

    @Override
    protected void finalize() throws Throwable {
        super.finalize();
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getMachine() {
        return machine;
    }

    public void setMachine(String machine) {
        this.machine = machine;
    }

    public String getJobnum() {
        return jobnum;
    }

    public void setJobnum(String jobnum) {
        this.jobnum = jobnum;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getTrayNumber() {
        return trayNumber;
    }

    public void setTrayNumber(String trayNumber) {
        this.trayNumber = trayNumber;
    }

    public String getsName() {
        return sName;
    }

    public void setsName(String sName) {
        this.sName = sName;
    }

    public String getmPckBarCode() {
        return mPckBarCode;
    }

    public void setmPckBarCode(String mPckBarCode) {
        this.mPckBarCode = mPckBarCode;
    }

    public String getDefOutDate() {
        return defOutDate;
    }

    public void setDefOutDate(String defOutDate) {
        this.defOutDate = defOutDate;
    }

    public MgUser getUser() {
        return user;
    }

    public void setUser(MgUser user) {
        this.user = user;
    }

    public Integer getOptType() {
        return optType;
    }

    public void setOptType(Integer optType) {
        this.optType = optType;
    }

    public Float getHandOverNum() {
        return handOverNum;
    }

    public void setHandOverNum(Float handOverNum) {
        this.handOverNum = handOverNum;
    }

    public String getWareHouse() {
        return wareHouse;
    }

    public void setWareHouse(String wareHouse) {
        this.wareHouse = wareHouse;
    }

    public String getLibrary() {
        return library;
    }

    public void setLibrary(String library) {
        this.library = library;
    }

    public List<String> getWorkers() {
        return workers;
    }

    public void setWorkers(List<String> workers) {
        this.workers = workers;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getCrashLog() {
        return crashLog;
    }

    public void setCrashLog(String crashLog) {
        this.crashLog = crashLog;
    }

    public String getLogFileName() {
        return logFileName;
    }

    public void setLogFileName(String logFileName) {
        this.logFileName = logFileName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getPos() {
        return pos;
    }

    public void setPos(Integer pos) {
        this.pos = pos;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PackMessageByWuLiu that = (PackMessageByWuLiu) o;
        return Objects.equal(time, that.time) &&
                Objects.equal(machine, that.machine) &&
                Objects.equal(jobnum, that.jobnum) &&
                Objects.equal(barcode, that.barcode) &&
                Objects.equal(trayNumber, that.trayNumber) &&
                Objects.equal(sName, that.sName) &&
                Objects.equal(mPckBarCode, that.mPckBarCode) &&
                Objects.equal(defOutDate, that.defOutDate) &&
                Objects.equal(mpckBarCode, that.mpckBarCode) &&
                Objects.equal(user, that.user) &&
                Objects.equal(optType, that.optType) &&
                Objects.equal(handOverNum, that.handOverNum) &&
                Objects.equal(wareHouse, that.wareHouse) &&
                Objects.equal(library, that.library) &&
                Objects.equal(workers, that.workers) &&
                Objects.equal(orderNo, that.orderNo) &&
                Objects.equal(crashLog, that.crashLog) &&
                Objects.equal(logFileName, that.logFileName) &&
                Objects.equal(status, that.status) &&
                Objects.equal(pos, that.pos) &&
                Objects.equal(message, that.message);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(time, machine, jobnum, barcode, trayNumber, sName, mPckBarCode, defOutDate, mpckBarCode, user, optType, handOverNum, wareHouse, library, workers, orderNo, crashLog, logFileName, status, pos, message);
    }
}
